package com.yisu.auction.api.domain.vo.goodsInfoPackageVos;

import org.apache.commons.lang.StringUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * author: 赵杰
 * Business Description：
 * createTime：2017/8/31
 */
public class AuctionResultVo {

    private Long prizeId;

    private BigDecimal transactionPrice;

    private BigDecimal price;

    //1 进行中 2 等待揭晓 3已经揭晓
    private Integer status;

    private String nickname;//最后出价人

    private String ico;//出价人头像

    private String offerPriceDate;//最后出价时间

    private int beginCountDown;//开始倒计时

    private List<OfferPriceVo> offerPriceVos; //出价列表 top 3

    public List<OfferPriceVo> getOfferPriceVos() {
        return offerPriceVos;
    }

    public void setOfferPriceVos(List<OfferPriceVo> offerPriceVos) {
        this.offerPriceVos = offerPriceVos;
    }


    public Long getPrizeId() {
        return prizeId;
    }

    public void setPrizeId(Long prizeId) {
        this.prizeId = prizeId;
    }

    public BigDecimal getTransactionPrice() {
        if (transactionPrice == null)
            return BigDecimal.valueOf(0);
        return transactionPrice;
    }

    public void setTransactionPrice(BigDecimal transactionPrice) {
        this.transactionPrice = transactionPrice;
    }

    public String getNickname() {
        if (StringUtils.isEmpty(nickname)) {
            return "匿名";
        }
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    public String getOfferPriceDate() {
        return offerPriceDate;
    }

    public void setOfferPriceDate(String offerPriceDate) {
        this.offerPriceDate = offerPriceDate;
    }

    public int getBeginCountDown() {
        return beginCountDown;
    }

    public void setBeginCountDown(int beginCountDown) {
        this.beginCountDown = beginCountDown;
    }

    public Integer getStatus() {
        if (status == 2)
            status = 1;
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
